package com.bocweb.fly.jiaodao.activitys;

import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;

import com.bocweb.fly.jiaodao.MainAct;
import com.bocweb.fly.jiaodao.R;
import com.bocweb.fly.jiaodao.actions.LoginActionCreator;
import com.bocweb.fly.jiaodao.stores.LoginStore;
import com.github.mzule.activityrouter.annotation.Router;
import com.github.mzule.activityrouter.router.Routers;
import com.milk.base.BaseActivity;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by fly on 2016/11/1.
 */
@Router("login")
public class LoginAct extends BaseActivity<LoginStore, LoginActionCreator>{
    @Bind(R.id.toolbar)
    Toolbar mToolbar;
    @Bind(R.id.title)
    TextView mTitle;
    @Override
    protected boolean isApplyStatusBarTranslucency() {
        return true;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_login;
    }

    @Override
    public void initData() {
        super.initData();
        mToolbar.setNavigationIcon(R.mipmap.back);
        mTitle.setText("登录");
        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }
    @OnClick({R.id.btn_login})
    public void onClick(View view){
        switch (view.getId()){
            case R.id.btn_login:
                Routers.open(this, "jiaodao://main");
                break;
        }
    }
}
